<?php
	/*
	 * @FileName: BuSignApiDomainService.class.php
	 * @Author: BuSign I.S.
	 * @Developers: Mario Lamers <info@busign.nl>
	 *              Sebas Lamers <sebasdevelopment@gmx.com>
	 *              
	 * @Desciption: This class models a domain.
	 * 
	 * @package BuSign
	 * @class BuSign_Domain
	 */

	class BuSign_Domain
	{
		// Define some vars.
		public $m_sDomainname  = '';
		public $m_aNameservers = array();
		public $m_aContacts    = array();
		public $m_aDnsRows     = array();
		public $m_sBranding    = '';
		
		/*
		 * Constructs a new domain.
		 */
		public function __construct ( $sDomainname, $aNameservers = array ( ), $aContacts = array ( ), $aDnsRows = array ( ), $uBranding = NULL )
		{
			$this->m_sDomainname  = $sDomainname;
			$this->m_aNameservers = $aNameservers;
			$this->m_aContacts    = $aContacts;
			$this->m_sBranding    = $uBranding;
		}
		
		public function GetDomainAuthCode ( )
		{
			return $this->m_sDomainname . ': ' . BuSignApi::_getBuSignSoapClient()->getDomainAuthCode ( $this->m_sDomainname );
		}
	}
	
	class BuSign_Nameservers
	{
		public $m_sHostname = '';
		public $m_sIPv4     = '';
		public $m_sIPv6     = '';
		
		public function __construct ( $sHostname, $sIPv4 = '', $sIPv6 = '' )
		{
			$this->m_sHostname = $sHostname;
			$this->m_sIPv4     = $sIPv4;
			$this->m_sIPv6     = $sIPv6;
		}
	}
	
	class BuSign_Contacts
	{
		public $m_aContactObjects = array ( 'DOMAINOWNER' => 'TypeDomainOwner'
		                                   ,'ADMINCONTACT' => 'TypeDomainAdmin'
	                                      );
	}
?>